﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/CRM.Master" CodeBehind="Default.aspx.cs"
    Inherits="crm.aplicacao.CRMSystem.Usuarios.Default" %>

<%@ Register Assembly="Ext.Net.UX" Namespace="Ext.Net.UX" TagPrefix="ux" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ext:GridPanel ID="GridUsuarios" runat="server" Title="Gerência de Usuários" AutoScroll="true"
        AutoExpandColumn="usuarios" Height="600">
        <Store>
            <ext:Store ID="strUsuarios" runat="server">
                <Reader>
                    <ext:ArrayReader>
                        <Fields>
                            <ext:RecordField Name="usuarios" />
                        </Fields>
                    </ext:ArrayReader>
                </Reader>
            </ext:Store>
        </Store>
        <TopBar>
            <ext:Toolbar ID="ToolbarUsuarios" runat="server" AutoWidth="true">
                <Items>
                    <ext:Button ID="btNovoUsuarios" runat="server" Text="Novo" Icon="Add">
                        <Listeners>
                            <Click Handler="#{win}.show()" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btEditarUsuarios" runat="server" Text="Editar" Icon="PageWhiteEdit">
                        <Listeners>
                            <Click Handler="alert('Ainda não Está Editando')" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btRemoverUsuarios" runat="server" Text="Remover" Icon="Delete">
                        <Listeners>
                            <Click Handler="alert ('Ainda não Está Removendo')" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:Column ColumnID="colUsuarios" Header="Nome" Width="160" DataIndex="usuarios" />
                <ext:Column ColumnID="colTelefone" Header="Telefone" Width="160" DataIndex="usuarios" />
                <ext:Column ColumnID="colCidade" Header="Cidade" Width="160" DataIndex="usuarios" />
            </Columns>
        </ColumnModel>
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
        </SelectionModel>
        <BottomBar>
            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="20" />
        </BottomBar>
        <LoadMask ShowMask="true" />
    </ext:GridPanel>
    <ext:Window ID="win" runat="server" Icon="User" Title="Dados do Usuário" Hidden="true"
        Modal="true" Width="430" AutoHeight="true" Resizable="false">
        <Items>
            <ext:FormPanel ID="FormNovoUsuarios" runat="server" Padding="5" Layout="Anchor" BodyStyle="background-color: transparent;"
                Header="false">
                <Items>
                    <ext:TextField ID="txtNomeUsuarios" runat="server" FieldLabel="Nome" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:TextField ID="txtEmailUsuarios" runat="server" FieldLabel="Email" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:TextField ID="txtTelefoneUsuarios" runat="server" FieldLabel="Telefone" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side">
                        <Plugins>
                            <ux:InputTextMask ID="InputTextMask1" runat="server" Mask="(99)9999-9999" />
                        </Plugins>
                    </ext:TextField>
                    <ext:TextField ID="txtCpfUsuarios" runat="server" FieldLabel="CPF" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side">
                        <Plugins>
                            <ux:InputTextMask ID="InputTextMask3" runat="server" Mask="999.999.999-99" />
                        </Plugins>
                    </ext:TextField>
                    <ext:TextField ID="txtRgUsuarios" runat="server" FieldLabel="RG" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:ComboBox ID="cboPaisUsuario" runat="server" FieldLabel="País" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:ComboBox ID="cboEstadoUsuario" runat="server" FieldLabel="Estado" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:ComboBox ID="cboCidades" runat="server" FieldLabel="Cidade" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                    <ext:RadioGroup ID="RadioGroup1" runat="server" ItemCls="x-check-group-base" FieldLabel="Vendedor">
                        <Items>
                            <ext:Radio ID="rdInterno" runat="server" BoxLabel="Interno" Checked="true" />
                            <ext:Radio ID="rdExterno" runat="server" BoxLabel="Externo" />
                        </Items>
                    </ext:RadioGroup>
                    <ext:TextField ID="txtSenhaUsuario" runat="server" FieldLabel="Senha" InputType="Password"
                        AnchorHorizontal="93%" AllowBlank="false" />
                    <ext:TextField ID="txtConfirmaSenhaUsuario" runat="server" Vtype="password" FieldLabel="Confirmar Senha"
                        InputType="Password" MsgTarget="Side" AnchorHorizontal="93%" AllowBlank="false" />
                </Items>
                <Buttons>
                    <ext:Button ID="btGravarUsuarios" runat="server" Text="Gravar" Icon="Disk">
                        <Listeners>
                            <Click Handler="alert('rsrs...Não Funciona')" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btCancelar" runat="server" Text="Cancelar" Icon="Cancel">
                        <Listeners>
                            <Click Handler="#{win}.hide();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
            </ext:FormPanel>
        </Items>
        <Listeners>
            <Close Handler="Ext.net.DirectMethods.limparCampo();" />
            <Hide Handler="Ext.net.DirectMethods.limparCampo();" />
        </Listeners>
    </ext:Window>
</asp:Content>
